class BaseModel{
  constructor(data, message){
    if(typeof data === 'string'){
      this.message = data
      data = null
      message = null
    }
    if(data){
      this.data = data
    }
    if (message){
      this.message = message
    }
  }
}

class SuccessModal extends BaseModel{
  constructor(data, message){
    super(data, message)
    this.status = 0
  }
}

class ErrorModal extends BaseModel{
  constructor(data, message){
    super(data, message)
    this.status = -1
  }
}

module.exports = {
  SuccessModal,
  ErrorModal
}
